﻿<%@ Page Language="C#" MasterPageFile="~/Masterpage.Master" AutoEventWireup="true" CodeBehind="MaintainMember.aspx.cs" Inherits="EmailMarketingCampaign.MaintainMember" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    
    
       
     <div class="content">
<div id="post-69" class="post">
 <span class="absolute box_2_t_l"></span> 
 <span class="absolute box_2_t_r"></span> 
 <span class="absolute box_2_b_l"></span>
  <span class="absolute box_2_b_r"></span>


<p class="a">Maintain Member Group </p>
 <div class="details">
       <asp:SqlDataSource

    ID="dsMySQL"

    runat="server"

    ConnectionString="<%$ ConnectionStrings:EmailMarketing_DBConnectionString%>"

    ProviderName="<%$ ConnectionStrings:EmailMarketing_DBConnectionString.ProviderName %>"

    SelectCommand="select * from membership where COMUniquelID =?COMUniquelID">
   
        
    <SelectParameters> <asp:SessionParameter Name="COMUniquelID"  SessionField="COMUniquelID"  Type="String" />   </SelectParameters>


    
    </asp:SqlDataSource>

   
    
        <br />
    
        <br />
    
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" DataSourceID="dsMySQL" DataKeyNames="MemberID" 
            onrowupdating="GridView1_RowUpdating" BorderColor="#EBEBEB" 
           onrowdatabound="GridView1_RowDataBound">
            <EmptyDataRowStyle BorderColor="#EBEBEB" />
            <Columns>
                <asp:BoundField DataField="MemberName" HeaderText="MemberName" 
                    ReadOnly="True" />
                <asp:BoundField DataField="Birthday" HeaderText="Birthday" ReadOnly="True" />
                <asp:BoundField DataField="SubscribeState" HeaderText="SubscribeState" 
                    ReadOnly="True" />
                <asp:TemplateField HeaderText="Group1">
                    <ItemTemplate>
                        <asp:DropDownList ID="drGroup1" runat="server" Height="23px" Width="126px" 
                            DataSourceID="group1" DataTextField="GroupName" DataValueField="Group1ID">
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Group2">
                    <ItemTemplate>
                        <asp:DropDownList ID="drGroup2" runat="server" Height="23px" Width="126px" 
                            DataSourceID="group2" DataTextField="GroupName" DataValueField="Group2ID">
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Group3">
                    <ItemTemplate>
                        <asp:DropDownList ID="drGroup3" runat="server" Height="23px" Width="126px"  
                            DataSourceID="group3" DataTextField="GroupName" DataValueField="Group3ID">
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerStyle HorizontalAlign="Right" />
               <HeaderStyle BackColor="#67A897" ForeColor="White"  Height ="30" HorizontalAlign="Center" />
        </asp:GridView>
     <asp:SqlDataSource ID="group1" runat="server"  ConnectionString="<%$ ConnectionStrings:EmailMarketing_DBConnectionString%>" ProviderName="<%$ ConnectionStrings:EmailMarketing_DBConnectionString.ProviderName %>"

    SelectCommand="select * from group1 where COMUniquelID =?COMUniquelID"> 
    
  <SelectParameters> <asp:SessionParameter Name="COMUniquelID"  SessionField="COMUniquelID"  Type="String" />   </SelectParameters>
</asp:SqlDataSource>
    
      <asp:SqlDataSource ID="group2" runat="server"  ConnectionString="<%$ ConnectionStrings:EmailMarketing_DBConnectionString%>" ProviderName="<%$ ConnectionStrings:EmailMarketing_DBConnectionString.ProviderName %>"

    SelectCommand="select * from group2  where COMUniquelID =?COMUniquelID "> 
        <SelectParameters> <asp:SessionParameter Name="COMUniquelID"  SessionField="COMUniquelID"  Type="String" />   </SelectParameters>

    </asp:SqlDataSource>
    
      <asp:SqlDataSource ID="group3" runat="server"  ConnectionString="<%$ ConnectionStrings:EmailMarketing_DBConnectionString%>" ProviderName="<%$ ConnectionStrings:EmailMarketing_DBConnectionString.ProviderName %>"

    SelectCommand="select * from group3 where COMUniquelID =?COMUniquelID "> 
        <SelectParameters> <asp:SessionParameter Name="COMUniquelID"  SessionField="COMUniquelID"  Type="String" />   </SelectParameters>

    </asp:SqlDataSource>
    
        <asp:Button ID="btnUpdate" runat="server" Height="27px" 
            onclick="btnUpdate_Click" Text="Update" Width ="71px" CssClass="button"  />
    </div>
       </div>
          </div>
          
</asp:Content>
